{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "\"\"\"A very simple MNIST classifier.\n",
    "See extensive documentation at\n",
    "https://www.tensorflow.org/get_started/mnist/beginners\n",
    "\"\"\"\n",
    "from __future__ import absolute_import\n",
    "from __future__ import division\n",
    "from __future__ import print_function\n",
    "\n",
    "import argparse\n",
    "import sys\n",
    "\n",
    "from tensorflow.examples.tutorials.mnist import input_data\n",
    "\n",
    "import tensorflow as tf\n",
    "\n",
    "import time\n",
    "import math\n",
    "\n",
    "FLAGS = None\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们在这里调用系统提供的Mnist数据函数为我们读入数据，如果没有下载的话则进行下载。\n",
    "\n",
    "<font color=#ff0000>**这里将data_dir改为适合你的运行环境的目录**</font>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting /tmp/tensorflow/mnist/input_data\\train-images-idx3-ubyte.gz\n",
      "Extracting /tmp/tensorflow/mnist/input_data\\train-labels-idx1-ubyte.gz\n",
      "Extracting /tmp/tensorflow/mnist/input_data\\t10k-images-idx3-ubyte.gz\n",
      "Extracting /tmp/tensorflow/mnist/input_data\\t10k-labels-idx1-ubyte.gz\n"
     ]
    }
   ],
   "source": [
    "# Import data\n",
    "data_dir = '/tmp/tensorflow/mnist/input_data'\n",
    "mnist = input_data.read_data_sets(data_dir, one_hot=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "一个非常非常简陋的模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "def hiddenLayer(m,n,h_pre):\n",
    "#     W_l = tf.Variable(tf.zeros([m, n]))\n",
    "    W_l = tf.Variable(tf.random_normal([m, n], mean=0.0, stddev=math.pow(2/m,0.5), dtype=tf.float32, seed=1))\n",
    "    b_l = tf.Variable(tf.random_normal([n], mean=0.0, stddev=math.pow(2/m,0.5), dtype=tf.float32, seed=2))\n",
    "    logits_l = tf.matmul(h_pre, W_l) + b_l\n",
    "#     h_l = tf.nn.softmax(logits_l)\n",
    "    h_l = tf.nn.relu(logits_l)\n",
    "    print(W_l,b_l,logits_l,h_l)\n",
    "    return W_l,b_l,logits_l,h_l, n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<tf.Variable 'Variable_10:0' shape=(784, 315) dtype=float32_ref> <tf.Variable 'Variable_11:0' shape=(315,) dtype=float32_ref> Tensor(\"add_6:0\", shape=(?, 315), dtype=float32) Tensor(\"Relu_5:0\", shape=(?, 315), dtype=float32)\n",
      "<tf.Variable 'Variable_12:0' shape=(315, 137) dtype=float32_ref> <tf.Variable 'Variable_13:0' shape=(137,) dtype=float32_ref> Tensor(\"add_7:0\", shape=(?, 137), dtype=float32) Tensor(\"Relu_6:0\", shape=(?, 137), dtype=float32)\n",
      "<tf.Variable 'Variable_14:0' shape=(137, 60) dtype=float32_ref> <tf.Variable 'Variable_15:0' shape=(60,) dtype=float32_ref> Tensor(\"add_8:0\", shape=(?, 60), dtype=float32) Tensor(\"Relu_7:0\", shape=(?, 60), dtype=float32)\n",
      "<tf.Variable 'Variable_16:0' shape=(60, 26) dtype=float32_ref> <tf.Variable 'Variable_17:0' shape=(26,) dtype=float32_ref> Tensor(\"add_9:0\", shape=(?, 26), dtype=float32) Tensor(\"Relu_8:0\", shape=(?, 26), dtype=float32)\n",
      "<tf.Variable 'Variable_18:0' shape=(26, 10) dtype=float32_ref> <tf.Variable 'Variable_19:0' shape=(10,) dtype=float32_ref> Tensor(\"add_10:0\", shape=(?, 10), dtype=float32) Tensor(\"Relu_9:0\", shape=(?, 10), dtype=float32)\n"
     ]
    }
   ],
   "source": [
    "# Create the model\n",
    "x = tf.placeholder(tf.float32, [None, 784])\n",
    "\n",
    "n1 = 315 #2^8.3\n",
    "W_1,b_1,logits_1,h_1,n_1= hiddenLayer(784, n1, x)\n",
    "\n",
    "# 137= 2^7.1\n",
    "W_2,b_2,logits_2,h_2,n_2= hiddenLayer(n_1, 137, h_1)\n",
    "\n",
    "# 60=2^5.9\n",
    "W_3,b_3,logits_3,h_3,n_3 = hiddenLayer(n_2, 60, h_2)\n",
    "\n",
    "# 26=2^4.7\n",
    "W_4,b_4,logits_4,h_4,n_4 = hiddenLayer(n_3, 26, h_3)\n",
    "\n",
    "# 10\n",
    "W_5,b_5,logits_5,h_5,n_5 = hiddenLayer(n_4, 10, h_4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "定义我们的ground truth 占位符"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define loss and optimizer\n",
    "y_ = tf.placeholder(tf.float32, [None, 10])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "接下来我们计算交叉熵，注意这里不要使用注释中的手动计算方式，而是使用系统函数。\n",
    "另一个注意点就是，softmax_cross_entropy_with_logits的logits参数是**未经激活的wx+b**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# The raw formulation of cross-entropy,\n",
    "#\n",
    "#   tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(tf.nn.softmax(y)),\n",
    "#                                 reduction_indices=[1]))\n",
    "#\n",
    "# can be numerically unstable.\n",
    "#\n",
    "# So here we use tf.nn.softmax_cross_entropy_with_logits on the raw\n",
    "# outputs of 'y', and then average across the batch.\n",
    "\n",
    "logits = logits_5\n",
    "y = logits\n",
    "lmbd = 0.005\n",
    "l2_regularizer=tf.contrib.layers.l2_regularizer(lmbd)\n",
    "# 加了正则项反而影响准确率\n",
    "# cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=y_, logits=logits) + l2_regularizer(W_2))\n",
    "cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=y_, logits=logits))\n",
    "output = h_2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "生成一个训练step"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "eta = 0.1\n",
    "train_step = tf.train.GradientDescentOptimizer(eta).minimize(cross_entropy)\n",
    "\n",
    "sess = tf.Session()\n",
    "init_op = tf.global_variables_initializer()\n",
    "sess.run(init_op)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_accuracy(x, y, t):\n",
    "    correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(t, 1))\n",
    "    accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))\n",
    "    return sess.run(accuracy, feed_dict={x: mnist.test.images, t: mnist.test.labels})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "在这里我们仍然调用系统提供的读取数据，为我们取得一个batch。\n",
    "然后我们运行6k个step(10 epochs)，对权重进行优化。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第0回合，acu_score=0.13519999384880066,cross_entropy_value=2.496537923812866,cost_time=0\n",
      "当前第10回合，acu_score=0.4207000136375427,cross_entropy_value=1.7337802648544312,cost_time=1\n",
      "当前第20回合，acu_score=0.6920999884605408,cross_entropy_value=1.2419288158416748,cost_time=1\n",
      "当前第30回合，acu_score=0.7276999950408936,cross_entropy_value=1.1872000694274902,cost_time=1\n",
      "当前第40回合，acu_score=0.7986000180244446,cross_entropy_value=0.8299277424812317,cost_time=2\n",
      "当前第50回合，acu_score=0.7462999820709229,cross_entropy_value=0.7711127996444702,cost_time=2\n",
      "当前第60回合，acu_score=0.8281000256538391,cross_entropy_value=0.5771884322166443,cost_time=2\n",
      "当前第70回合，acu_score=0.8345999717712402,cross_entropy_value=0.5964509844779968,cost_time=3\n",
      "当前第80回合，acu_score=0.8201000094413757,cross_entropy_value=0.6194298267364502,cost_time=3\n",
      "当前第90回合，acu_score=0.8758999705314636,cross_entropy_value=0.46930357813835144,cost_time=3\n",
      "当前第100回合，acu_score=0.8844000101089478,cross_entropy_value=0.3915073871612549,cost_time=4\n",
      "当前第110回合，acu_score=0.8801000118255615,cross_entropy_value=0.43250930309295654,cost_time=4\n",
      "当前第120回合，acu_score=0.8988999724388123,cross_entropy_value=0.38620853424072266,cost_time=4\n",
      "当前第130回合，acu_score=0.9023000001907349,cross_entropy_value=0.43439725041389465,cost_time=5\n",
      "当前第140回合，acu_score=0.9067999720573425,cross_entropy_value=0.19185711443424225,cost_time=5\n",
      "当前第150回合，acu_score=0.9032999873161316,cross_entropy_value=0.36689049005508423,cost_time=6\n",
      "当前第160回合，acu_score=0.8871999979019165,cross_entropy_value=0.38611114025115967,cost_time=6\n",
      "当前第170回合，acu_score=0.9088000059127808,cross_entropy_value=0.206348717212677,cost_time=6\n",
      "当前第180回合，acu_score=0.9082000255584717,cross_entropy_value=0.3180863857269287,cost_time=7\n",
      "当前第190回合，acu_score=0.8931000232696533,cross_entropy_value=0.29150864481925964,cost_time=7\n",
      "当前第200回合，acu_score=0.9009000062942505,cross_entropy_value=0.38125377893447876,cost_time=7\n",
      "当前第210回合，acu_score=0.9241999983787537,cross_entropy_value=0.2881474792957306,cost_time=8\n",
      "当前第220回合，acu_score=0.9099000096321106,cross_entropy_value=0.32612091302871704,cost_time=8\n",
      "当前第230回合，acu_score=0.9032999873161316,cross_entropy_value=0.3970625400543213,cost_time=8\n",
      "当前第240回合，acu_score=0.9240999817848206,cross_entropy_value=0.4478125274181366,cost_time=9\n",
      "当前第250回合，acu_score=0.9205999970436096,cross_entropy_value=0.16728991270065308,cost_time=9\n",
      "当前第260回合，acu_score=0.9247999787330627,cross_entropy_value=0.20806904137134552,cost_time=9\n",
      "当前第270回合，acu_score=0.9293000102043152,cross_entropy_value=0.1684747189283371,cost_time=10\n",
      "当前第280回合，acu_score=0.9294999837875366,cross_entropy_value=0.23934873938560486,cost_time=10\n",
      "当前第290回合，acu_score=0.928600013256073,cross_entropy_value=0.32256653904914856,cost_time=10\n",
      "当前第300回合，acu_score=0.9165999889373779,cross_entropy_value=0.320882648229599,cost_time=11\n",
      "当前第310回合，acu_score=0.9366000294685364,cross_entropy_value=0.24640540778636932,cost_time=11\n",
      "当前第320回合，acu_score=0.9284999966621399,cross_entropy_value=0.19991250336170197,cost_time=11\n",
      "当前第330回合，acu_score=0.9358999729156494,cross_entropy_value=0.24349701404571533,cost_time=12\n",
      "当前第340回合，acu_score=0.933899998664856,cross_entropy_value=0.16959917545318604,cost_time=12\n",
      "当前第350回合，acu_score=0.9406999945640564,cross_entropy_value=0.1363333761692047,cost_time=13\n",
      "当前第360回合，acu_score=0.9434999823570251,cross_entropy_value=0.11352717131376266,cost_time=13\n",
      "当前第370回合，acu_score=0.9370999932289124,cross_entropy_value=0.14028587937355042,cost_time=14\n",
      "当前第380回合，acu_score=0.9433000087738037,cross_entropy_value=0.15656329691410065,cost_time=14\n",
      "当前第390回合，acu_score=0.9434000253677368,cross_entropy_value=0.15663985908031464,cost_time=15\n",
      "当前第400回合，acu_score=0.9463000297546387,cross_entropy_value=0.2612401247024536,cost_time=15\n",
      "当前第410回合，acu_score=0.9388999938964844,cross_entropy_value=0.12046793103218079,cost_time=15\n",
      "当前第420回合，acu_score=0.9459999799728394,cross_entropy_value=0.19896356761455536,cost_time=16\n",
      "当前第430回合，acu_score=0.9487000107765198,cross_entropy_value=0.10972472280263901,cost_time=16\n",
      "当前第440回合，acu_score=0.9503999948501587,cross_entropy_value=0.1889217048883438,cost_time=16\n",
      "当前第450回合，acu_score=0.9491999745368958,cross_entropy_value=0.16011613607406616,cost_time=17\n",
      "当前第460回合，acu_score=0.9510999917984009,cross_entropy_value=0.09925976395606995,cost_time=17\n",
      "当前第470回合，acu_score=0.9453999996185303,cross_entropy_value=0.10848534852266312,cost_time=18\n",
      "当前第480回合，acu_score=0.9473999738693237,cross_entropy_value=0.2632119953632355,cost_time=18\n",
      "当前第490回合，acu_score=0.9395999908447266,cross_entropy_value=0.13744989037513733,cost_time=19\n",
      "当前第500回合，acu_score=0.9509999752044678,cross_entropy_value=0.1811257004737854,cost_time=19\n",
      "当前第510回合，acu_score=0.9488000273704529,cross_entropy_value=0.09146425127983093,cost_time=20\n",
      "当前第520回合，acu_score=0.9523000121116638,cross_entropy_value=0.18268243968486786,cost_time=20\n",
      "当前第530回合，acu_score=0.9413999915122986,cross_entropy_value=0.1937330663204193,cost_time=21\n",
      "当前第540回合，acu_score=0.9581000208854675,cross_entropy_value=0.07547841221094131,cost_time=21\n",
      "当前第550回合，acu_score=0.9524999856948853,cross_entropy_value=0.14352665841579437,cost_time=21\n",
      "当前第560回合，acu_score=0.954200029373169,cross_entropy_value=0.1754315048456192,cost_time=22\n",
      "当前第570回合，acu_score=0.9537000060081482,cross_entropy_value=0.13481178879737854,cost_time=22\n",
      "当前第580回合，acu_score=0.9516000151634216,cross_entropy_value=0.12588495016098022,cost_time=23\n",
      "当前第590回合，acu_score=0.9502999782562256,cross_entropy_value=0.24171973764896393,cost_time=23\n",
      "当前第600回合，acu_score=0.9555000066757202,cross_entropy_value=0.25832146406173706,cost_time=23\n",
      "当前第610回合，acu_score=0.9564999938011169,cross_entropy_value=0.03288499638438225,cost_time=24\n",
      "当前第620回合，acu_score=0.9545999765396118,cross_entropy_value=0.17315471172332764,cost_time=24\n",
      "当前第630回合，acu_score=0.954800009727478,cross_entropy_value=0.1411585956811905,cost_time=24\n",
      "当前第640回合，acu_score=0.9470999836921692,cross_entropy_value=0.19074009358882904,cost_time=25\n",
      "当前第650回合，acu_score=0.9592000246047974,cross_entropy_value=0.15208519995212555,cost_time=25\n",
      "当前第660回合，acu_score=0.9490000009536743,cross_entropy_value=0.16376420855522156,cost_time=26\n",
      "当前第670回合，acu_score=0.9587000012397766,cross_entropy_value=0.1921434849500656,cost_time=26\n",
      "当前第680回合，acu_score=0.9605000019073486,cross_entropy_value=0.09380350261926651,cost_time=26\n",
      "当前第690回合，acu_score=0.9603999853134155,cross_entropy_value=0.0688660740852356,cost_time=27\n",
      "当前第700回合，acu_score=0.954800009727478,cross_entropy_value=0.1352377086877823,cost_time=27\n",
      "当前第710回合，acu_score=0.9581000208854675,cross_entropy_value=0.33668118715286255,cost_time=28\n",
      "当前第720回合，acu_score=0.9595999717712402,cross_entropy_value=0.10002166777849197,cost_time=28\n",
      "当前第730回合，acu_score=0.953000009059906,cross_entropy_value=0.18255561590194702,cost_time=29\n",
      "当前第740回合，acu_score=0.955299973487854,cross_entropy_value=0.08502895385026932,cost_time=29\n",
      "当前第750回合，acu_score=0.9629999995231628,cross_entropy_value=0.1797337383031845,cost_time=30\n",
      "当前第760回合，acu_score=0.9538000226020813,cross_entropy_value=0.16952216625213623,cost_time=30\n",
      "当前第770回合，acu_score=0.9539999961853027,cross_entropy_value=0.14842383563518524,cost_time=31\n",
      "当前第780回合，acu_score=0.9574000239372253,cross_entropy_value=0.08941014111042023,cost_time=31\n",
      "当前第790回合，acu_score=0.953499972820282,cross_entropy_value=0.24015489220619202,cost_time=32\n",
      "当前第800回合，acu_score=0.9616000056266785,cross_entropy_value=0.10484562069177628,cost_time=32\n",
      "当前第810回合，acu_score=0.9596999883651733,cross_entropy_value=0.18717855215072632,cost_time=32\n",
      "当前第820回合，acu_score=0.9598000049591064,cross_entropy_value=0.22000525891780853,cost_time=33\n",
      "当前第830回合，acu_score=0.9610999822616577,cross_entropy_value=0.12271083146333694,cost_time=33\n",
      "当前第840回合，acu_score=0.9462000131607056,cross_entropy_value=0.289896160364151,cost_time=33\n",
      "当前第850回合，acu_score=0.9574000239372253,cross_entropy_value=0.128737673163414,cost_time=34\n",
      "当前第860回合，acu_score=0.9620000123977661,cross_entropy_value=0.1371050477027893,cost_time=34\n",
      "当前第870回合，acu_score=0.9595999717712402,cross_entropy_value=0.09152431786060333,cost_time=34\n",
      "当前第880回合，acu_score=0.9620000123977661,cross_entropy_value=0.1359759271144867,cost_time=35\n",
      "当前第890回合，acu_score=0.9625999927520752,cross_entropy_value=0.037819668650627136,cost_time=35\n",
      "当前第900回合，acu_score=0.9614999890327454,cross_entropy_value=0.09259884804487228,cost_time=35\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第910回合，acu_score=0.9610999822616577,cross_entropy_value=0.10921584814786911,cost_time=36\n",
      "当前第920回合，acu_score=0.9625999927520752,cross_entropy_value=0.056290462613105774,cost_time=36\n",
      "当前第930回合，acu_score=0.9648000001907349,cross_entropy_value=0.13957515358924866,cost_time=36\n",
      "当前第940回合，acu_score=0.9624000191688538,cross_entropy_value=0.09044945985078812,cost_time=37\n",
      "当前第950回合，acu_score=0.9584000110626221,cross_entropy_value=0.12101584672927856,cost_time=37\n",
      "当前第960回合，acu_score=0.9627000093460083,cross_entropy_value=0.04793131723999977,cost_time=37\n",
      "当前第970回合，acu_score=0.9628999829292297,cross_entropy_value=0.13746273517608643,cost_time=38\n",
      "当前第980回合，acu_score=0.9613000154495239,cross_entropy_value=0.11989877372980118,cost_time=38\n",
      "当前第990回合，acu_score=0.9659000039100647,cross_entropy_value=0.21003571152687073,cost_time=39\n",
      "当前第1000回合，acu_score=0.9674999713897705,cross_entropy_value=0.05479170382022858,cost_time=39\n",
      "当前第1010回合，acu_score=0.9620000123977661,cross_entropy_value=0.21251565217971802,cost_time=39\n",
      "当前第1020回合，acu_score=0.9660000205039978,cross_entropy_value=0.2329431027173996,cost_time=40\n",
      "当前第1030回合，acu_score=0.961899995803833,cross_entropy_value=0.0641845241189003,cost_time=40\n",
      "当前第1040回合，acu_score=0.9549999833106995,cross_entropy_value=0.20945703983306885,cost_time=40\n",
      "当前第1050回合，acu_score=0.9609000086784363,cross_entropy_value=0.09497090429067612,cost_time=41\n",
      "当前第1060回合，acu_score=0.9674999713897705,cross_entropy_value=0.22564807534217834,cost_time=41\n",
      "当前第1070回合，acu_score=0.9657999873161316,cross_entropy_value=0.12083766609430313,cost_time=41\n",
      "当前第1080回合，acu_score=0.9682000279426575,cross_entropy_value=0.03523481637239456,cost_time=42\n",
      "当前第1090回合，acu_score=0.9656000137329102,cross_entropy_value=0.07892682403326035,cost_time=42\n",
      "当前第1100回合，acu_score=0.9690999984741211,cross_entropy_value=0.04500352218747139,cost_time=42\n",
      "当前第1110回合，acu_score=0.9661999940872192,cross_entropy_value=0.16178110241889954,cost_time=43\n",
      "当前第1120回合，acu_score=0.9653000235557556,cross_entropy_value=0.08336391299962997,cost_time=43\n",
      "当前第1130回合，acu_score=0.964900016784668,cross_entropy_value=0.1359693855047226,cost_time=44\n",
      "当前第1140回合，acu_score=0.9685999751091003,cross_entropy_value=0.05304202064871788,cost_time=44\n",
      "当前第1150回合，acu_score=0.9670000076293945,cross_entropy_value=0.1022648885846138,cost_time=44\n",
      "当前第1160回合，acu_score=0.9692999720573425,cross_entropy_value=0.0715869590640068,cost_time=45\n",
      "当前第1170回合，acu_score=0.9667999744415283,cross_entropy_value=0.10853277891874313,cost_time=45\n",
      "当前第1180回合，acu_score=0.9631999731063843,cross_entropy_value=0.08136235177516937,cost_time=45\n",
      "当前第1190回合，acu_score=0.9699000120162964,cross_entropy_value=0.05528223514556885,cost_time=46\n",
      "当前第1200回合，acu_score=0.9677000045776367,cross_entropy_value=0.049823686480522156,cost_time=46\n",
      "当前第1210回合，acu_score=0.9668999910354614,cross_entropy_value=0.10473237931728363,cost_time=47\n",
      "当前第1220回合，acu_score=0.9685999751091003,cross_entropy_value=0.14540810883045197,cost_time=47\n",
      "当前第1230回合，acu_score=0.9703999757766724,cross_entropy_value=0.07905900478363037,cost_time=47\n",
      "当前第1240回合，acu_score=0.9679999947547913,cross_entropy_value=0.09014398604631424,cost_time=48\n",
      "当前第1250回合，acu_score=0.9642000198364258,cross_entropy_value=0.04639572277665138,cost_time=48\n",
      "当前第1260回合，acu_score=0.9652000069618225,cross_entropy_value=0.09446495771408081,cost_time=48\n",
      "当前第1270回合，acu_score=0.963699996471405,cross_entropy_value=0.030723463743925095,cost_time=49\n",
      "当前第1280回合，acu_score=0.9688000082969666,cross_entropy_value=0.09448470175266266,cost_time=49\n",
      "当前第1290回合，acu_score=0.9617999792098999,cross_entropy_value=0.08351653069257736,cost_time=49\n",
      "当前第1300回合，acu_score=0.9692000150680542,cross_entropy_value=0.1102435365319252,cost_time=50\n",
      "当前第1310回合，acu_score=0.9670000076293945,cross_entropy_value=0.15459875762462616,cost_time=50\n",
      "当前第1320回合，acu_score=0.9674999713897705,cross_entropy_value=0.0772726759314537,cost_time=50\n",
      "当前第1330回合，acu_score=0.9703999757766724,cross_entropy_value=0.10156253725290298,cost_time=51\n",
      "当前第1340回合，acu_score=0.9718000292778015,cross_entropy_value=0.2578999400138855,cost_time=51\n",
      "当前第1350回合，acu_score=0.9656999707221985,cross_entropy_value=0.096659354865551,cost_time=52\n",
      "当前第1360回合，acu_score=0.9686999917030334,cross_entropy_value=0.04639881104230881,cost_time=52\n",
      "当前第1370回合，acu_score=0.9667999744415283,cross_entropy_value=0.08578428626060486,cost_time=52\n",
      "当前第1380回合，acu_score=0.9656000137329102,cross_entropy_value=0.06236454099416733,cost_time=53\n",
      "当前第1390回合，acu_score=0.9696000218391418,cross_entropy_value=0.035578954964876175,cost_time=53\n",
      "当前第1400回合，acu_score=0.9567000269889832,cross_entropy_value=0.13144709169864655,cost_time=53\n",
      "当前第1410回合，acu_score=0.9697999954223633,cross_entropy_value=0.10339207947254181,cost_time=54\n",
      "当前第1420回合，acu_score=0.9642000198364258,cross_entropy_value=0.09501919150352478,cost_time=54\n",
      "当前第1430回合，acu_score=0.9678999781608582,cross_entropy_value=0.1282518059015274,cost_time=54\n",
      "当前第1440回合，acu_score=0.9649999737739563,cross_entropy_value=0.07494083791971207,cost_time=55\n",
      "当前第1450回合，acu_score=0.9718999862670898,cross_entropy_value=0.028311578556895256,cost_time=55\n",
      "当前第1460回合，acu_score=0.9674000144004822,cross_entropy_value=0.14523059129714966,cost_time=55\n",
      "当前第1470回合，acu_score=0.9616000056266785,cross_entropy_value=0.05729847773909569,cost_time=56\n",
      "当前第1480回合，acu_score=0.963699996471405,cross_entropy_value=0.13525119423866272,cost_time=56\n",
      "当前第1490回合，acu_score=0.9688000082969666,cross_entropy_value=0.13687162101268768,cost_time=56\n",
      "当前第1500回合，acu_score=0.9688000082969666,cross_entropy_value=0.07955006510019302,cost_time=57\n",
      "当前第1510回合，acu_score=0.96670001745224,cross_entropy_value=0.045471981167793274,cost_time=57\n",
      "当前第1520回合，acu_score=0.9682999849319458,cross_entropy_value=0.1098654568195343,cost_time=57\n",
      "当前第1530回合，acu_score=0.972599983215332,cross_entropy_value=0.03109179250895977,cost_time=58\n",
      "当前第1540回合，acu_score=0.9722999930381775,cross_entropy_value=0.016851017251610756,cost_time=58\n",
      "当前第1550回合，acu_score=0.9697999954223633,cross_entropy_value=0.09184908866882324,cost_time=58\n",
      "当前第1560回合，acu_score=0.9677000045776367,cross_entropy_value=0.06651423126459122,cost_time=59\n",
      "当前第1570回合，acu_score=0.9714000225067139,cross_entropy_value=0.10911191254854202,cost_time=59\n",
      "当前第1580回合，acu_score=0.9710000157356262,cross_entropy_value=0.04691039025783539,cost_time=59\n",
      "当前第1590回合，acu_score=0.9725000262260437,cross_entropy_value=0.015510163269937038,cost_time=60\n",
      "当前第1600回合，acu_score=0.9689000248908997,cross_entropy_value=0.0846673846244812,cost_time=60\n",
      "当前第1610回合，acu_score=0.97079998254776,cross_entropy_value=0.23067548871040344,cost_time=61\n",
      "当前第1620回合，acu_score=0.9714999794960022,cross_entropy_value=0.06141100451350212,cost_time=61\n",
      "当前第1630回合，acu_score=0.9556999802589417,cross_entropy_value=0.1313258409500122,cost_time=62\n",
      "当前第1640回合，acu_score=0.9690999984741211,cross_entropy_value=0.11721232533454895,cost_time=62\n",
      "当前第1650回合，acu_score=0.9706000089645386,cross_entropy_value=0.04361780732870102,cost_time=62\n",
      "当前第1660回合，acu_score=0.9703999757766724,cross_entropy_value=0.0827207937836647,cost_time=63\n",
      "当前第1670回合，acu_score=0.973800003528595,cross_entropy_value=0.07616334408521652,cost_time=63\n",
      "当前第1680回合，acu_score=0.9736999869346619,cross_entropy_value=0.0644419938325882,cost_time=64\n",
      "当前第1690回合，acu_score=0.9715999960899353,cross_entropy_value=0.050933610647916794,cost_time=64\n",
      "当前第1700回合，acu_score=0.9739000201225281,cross_entropy_value=0.026018919423222542,cost_time=64\n",
      "当前第1710回合，acu_score=0.9567999839782715,cross_entropy_value=0.12105324119329453,cost_time=65\n",
      "当前第1720回合，acu_score=0.9708999991416931,cross_entropy_value=0.08366665244102478,cost_time=65\n",
      "当前第1730回合，acu_score=0.9700999855995178,cross_entropy_value=0.09268065541982651,cost_time=65\n",
      "当前第1740回合，acu_score=0.9732000231742859,cross_entropy_value=0.05988511070609093,cost_time=66\n",
      "当前第1750回合，acu_score=0.9717000126838684,cross_entropy_value=0.02513558231294155,cost_time=66\n",
      "当前第1760回合，acu_score=0.9702000021934509,cross_entropy_value=0.04974289983510971,cost_time=66\n",
      "当前第1770回合，acu_score=0.9690999984741211,cross_entropy_value=0.06143845617771149,cost_time=67\n",
      "当前第1780回合，acu_score=0.9650999903678894,cross_entropy_value=0.08717524260282516,cost_time=67\n",
      "当前第1790回合，acu_score=0.972000002861023,cross_entropy_value=0.1269998401403427,cost_time=67\n",
      "当前第1800回合，acu_score=0.9742000102996826,cross_entropy_value=0.10220003128051758,cost_time=68\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第1810回合，acu_score=0.9736999869346619,cross_entropy_value=0.09397462010383606,cost_time=68\n",
      "当前第1820回合，acu_score=0.9692999720573425,cross_entropy_value=0.22149966657161713,cost_time=69\n",
      "当前第1830回合，acu_score=0.9733999967575073,cross_entropy_value=0.03197074681520462,cost_time=69\n",
      "当前第1840回合，acu_score=0.9656999707221985,cross_entropy_value=0.16608211398124695,cost_time=69\n",
      "当前第1850回合，acu_score=0.9671000242233276,cross_entropy_value=0.152733713388443,cost_time=69\n",
      "当前第1860回合，acu_score=0.9735000133514404,cross_entropy_value=0.07731615006923676,cost_time=70\n",
      "当前第1870回合，acu_score=0.9696999788284302,cross_entropy_value=0.04349999502301216,cost_time=70\n",
      "当前第1880回合，acu_score=0.9700999855995178,cross_entropy_value=0.18955720961093903,cost_time=71\n",
      "当前第1890回合，acu_score=0.9664999842643738,cross_entropy_value=0.06792651861906052,cost_time=71\n",
      "当前第1900回合，acu_score=0.9747999906539917,cross_entropy_value=0.04727108031511307,cost_time=71\n",
      "当前第1910回合，acu_score=0.9739999771118164,cross_entropy_value=0.052353858947753906,cost_time=72\n",
      "当前第1920回合，acu_score=0.9670000076293945,cross_entropy_value=0.04966655746102333,cost_time=72\n",
      "当前第1930回合，acu_score=0.9696000218391418,cross_entropy_value=0.018258076161146164,cost_time=72\n",
      "当前第1940回合，acu_score=0.9743000268936157,cross_entropy_value=0.060232583433389664,cost_time=73\n",
      "当前第1950回合，acu_score=0.9693999886512756,cross_entropy_value=0.17447364330291748,cost_time=73\n",
      "当前第1960回合，acu_score=0.9729999899864197,cross_entropy_value=0.0655791386961937,cost_time=73\n",
      "当前第1970回合，acu_score=0.9725000262260437,cross_entropy_value=0.020350569859147072,cost_time=74\n",
      "当前第1980回合，acu_score=0.9750999808311462,cross_entropy_value=0.03346078470349312,cost_time=74\n",
      "当前第1990回合，acu_score=0.885699987411499,cross_entropy_value=0.36903277039527893,cost_time=75\n",
      "当前第2000回合，acu_score=0.9739000201225281,cross_entropy_value=0.02274201437830925,cost_time=75\n",
      "当前第2010回合，acu_score=0.9726999998092651,cross_entropy_value=0.01118854247033596,cost_time=75\n",
      "当前第2020回合，acu_score=0.9702000021934509,cross_entropy_value=0.05575769767165184,cost_time=76\n",
      "当前第2030回合，acu_score=0.9745000004768372,cross_entropy_value=0.08593211323022842,cost_time=76\n",
      "当前第2040回合，acu_score=0.973800003528595,cross_entropy_value=0.026615148410201073,cost_time=76\n",
      "当前第2050回合，acu_score=0.9733999967575073,cross_entropy_value=0.01308381650596857,cost_time=77\n",
      "当前第2060回合，acu_score=0.9739999771118164,cross_entropy_value=0.07839527726173401,cost_time=77\n",
      "当前第2070回合，acu_score=0.9743000268936157,cross_entropy_value=0.09455724060535431,cost_time=78\n",
      "当前第2080回合，acu_score=0.9746999740600586,cross_entropy_value=0.0433075912296772,cost_time=78\n",
      "当前第2090回合，acu_score=0.9761000275611877,cross_entropy_value=0.036193691194057465,cost_time=79\n",
      "当前第2100回合，acu_score=0.9753000140190125,cross_entropy_value=0.03434525057673454,cost_time=79\n",
      "当前第2110回合，acu_score=0.9753000140190125,cross_entropy_value=0.04169662296772003,cost_time=79\n",
      "当前第2120回合，acu_score=0.9757000207901001,cross_entropy_value=0.039806682616472244,cost_time=80\n",
      "当前第2130回合，acu_score=0.9708999991416931,cross_entropy_value=0.05505512282252312,cost_time=80\n",
      "当前第2140回合，acu_score=0.972599983215332,cross_entropy_value=0.06463045626878738,cost_time=80\n",
      "当前第2150回合，acu_score=0.9747999906539917,cross_entropy_value=0.01924823224544525,cost_time=81\n",
      "当前第2160回合，acu_score=0.9736999869346619,cross_entropy_value=0.11940676718950272,cost_time=81\n",
      "当前第2170回合，acu_score=0.9706000089645386,cross_entropy_value=0.09997104853391647,cost_time=81\n",
      "当前第2180回合，acu_score=0.9653000235557556,cross_entropy_value=0.043622937053442,cost_time=82\n",
      "当前第2190回合，acu_score=0.9704999923706055,cross_entropy_value=0.09921037405729294,cost_time=82\n",
      "当前第2200回合，acu_score=0.9739999771118164,cross_entropy_value=0.059725865721702576,cost_time=83\n",
      "当前第2210回合，acu_score=0.9742000102996826,cross_entropy_value=0.054597724229097366,cost_time=83\n",
      "当前第2220回合，acu_score=0.975600004196167,cross_entropy_value=0.03697672858834267,cost_time=83\n",
      "当前第2230回合，acu_score=0.9641000032424927,cross_entropy_value=0.1088372990489006,cost_time=84\n",
      "当前第2240回合，acu_score=0.9735999703407288,cross_entropy_value=0.021454812958836555,cost_time=84\n",
      "当前第2250回合，acu_score=0.9710000157356262,cross_entropy_value=0.055673740804195404,cost_time=85\n",
      "当前第2260回合，acu_score=0.9739000201225281,cross_entropy_value=0.06549481302499771,cost_time=85\n",
      "当前第2270回合，acu_score=0.9736999869346619,cross_entropy_value=0.020160235464572906,cost_time=85\n",
      "当前第2280回合，acu_score=0.9731000065803528,cross_entropy_value=0.08933982253074646,cost_time=86\n",
      "当前第2290回合，acu_score=0.9757000207901001,cross_entropy_value=0.02384948544204235,cost_time=86\n",
      "当前第2300回合，acu_score=0.9743000268936157,cross_entropy_value=0.03164898231625557,cost_time=87\n",
      "当前第2310回合，acu_score=0.9761999845504761,cross_entropy_value=0.04510561004281044,cost_time=87\n",
      "当前第2320回合，acu_score=0.9726999998092651,cross_entropy_value=0.026135385036468506,cost_time=88\n",
      "当前第2330回合，acu_score=0.9746999740600586,cross_entropy_value=0.0239074919372797,cost_time=88\n",
      "当前第2340回合，acu_score=0.9743000268936157,cross_entropy_value=0.07487346231937408,cost_time=89\n",
      "当前第2350回合，acu_score=0.9761000275611877,cross_entropy_value=0.038031093776226044,cost_time=89\n",
      "当前第2360回合，acu_score=0.9761000275611877,cross_entropy_value=0.029597921296954155,cost_time=89\n",
      "当前第2370回合，acu_score=0.9760000109672546,cross_entropy_value=0.06999405473470688,cost_time=90\n",
      "当前第2380回合，acu_score=0.975600004196167,cross_entropy_value=0.09241117537021637,cost_time=90\n",
      "当前第2390回合，acu_score=0.9751999974250793,cross_entropy_value=0.11669464409351349,cost_time=91\n",
      "当前第2400回合，acu_score=0.975600004196167,cross_entropy_value=0.04710469767451286,cost_time=91\n",
      "当前第2410回合，acu_score=0.9760000109672546,cross_entropy_value=0.005647537764161825,cost_time=91\n",
      "当前第2420回合，acu_score=0.9739999771118164,cross_entropy_value=0.013473501428961754,cost_time=92\n",
      "当前第2430回合，acu_score=0.9695000052452087,cross_entropy_value=0.06783968210220337,cost_time=92\n",
      "当前第2440回合，acu_score=0.9750000238418579,cross_entropy_value=0.059261418879032135,cost_time=93\n",
      "当前第2450回合，acu_score=0.9769999980926514,cross_entropy_value=0.053019165992736816,cost_time=93\n",
      "当前第2460回合，acu_score=0.9722999930381775,cross_entropy_value=0.1757306307554245,cost_time=94\n",
      "当前第2470回合，acu_score=0.968500018119812,cross_entropy_value=0.09110716730356216,cost_time=94\n",
      "当前第2480回合，acu_score=0.9749000072479248,cross_entropy_value=0.014433537609875202,cost_time=94\n",
      "当前第2490回合，acu_score=0.9764999747276306,cross_entropy_value=0.03226929530501366,cost_time=95\n",
      "当前第2500回合，acu_score=0.9660000205039978,cross_entropy_value=0.08447007834911346,cost_time=95\n",
      "当前第2510回合，acu_score=0.9760000109672546,cross_entropy_value=0.021273886784911156,cost_time=96\n",
      "当前第2520回合，acu_score=0.9722999930381775,cross_entropy_value=0.018672632053494453,cost_time=96\n",
      "当前第2530回合，acu_score=0.9735999703407288,cross_entropy_value=0.0756261944770813,cost_time=96\n",
      "当前第2540回合，acu_score=0.9739000201225281,cross_entropy_value=0.025271618738770485,cost_time=97\n",
      "当前第2550回合，acu_score=0.9754999876022339,cross_entropy_value=0.012242699041962624,cost_time=97\n",
      "当前第2560回合，acu_score=0.973800003528595,cross_entropy_value=0.0482667051255703,cost_time=97\n",
      "当前第2570回合，acu_score=0.9764000177383423,cross_entropy_value=0.03845189884305,cost_time=98\n",
      "当前第2580回合，acu_score=0.9746000170707703,cross_entropy_value=0.07914111018180847,cost_time=98\n",
      "当前第2590回合，acu_score=0.9740999937057495,cross_entropy_value=0.16948913037776947,cost_time=99\n",
      "当前第2600回合，acu_score=0.9751999974250793,cross_entropy_value=0.0194458719342947,cost_time=99\n",
      "当前第2610回合，acu_score=0.9739000201225281,cross_entropy_value=0.016016192734241486,cost_time=99\n",
      "当前第2620回合，acu_score=0.9760000109672546,cross_entropy_value=0.03711150214076042,cost_time=100\n",
      "当前第2630回合，acu_score=0.9746000170707703,cross_entropy_value=0.0348602831363678,cost_time=100\n",
      "当前第2640回合，acu_score=0.974399983882904,cross_entropy_value=0.03275038301944733,cost_time=101\n",
      "当前第2650回合，acu_score=0.9747999906539917,cross_entropy_value=0.012789205648005009,cost_time=101\n",
      "当前第2660回合，acu_score=0.9667999744415283,cross_entropy_value=0.09671598672866821,cost_time=101\n",
      "当前第2670回合，acu_score=0.9718000292778015,cross_entropy_value=0.0354885496199131,cost_time=102\n",
      "当前第2680回合，acu_score=0.9757999777793884,cross_entropy_value=0.005126930307596922,cost_time=102\n",
      "当前第2690回合，acu_score=0.9761000275611877,cross_entropy_value=0.015121571719646454,cost_time=102\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第2700回合，acu_score=0.9747999906539917,cross_entropy_value=0.009280761703848839,cost_time=103\n",
      "当前第2710回合，acu_score=0.9761000275611877,cross_entropy_value=0.046138886362314224,cost_time=103\n",
      "当前第2720回合，acu_score=0.9736999869346619,cross_entropy_value=0.029692428186535835,cost_time=104\n",
      "当前第2730回合，acu_score=0.9704999923706055,cross_entropy_value=0.08407469838857651,cost_time=104\n",
      "当前第2740回合，acu_score=0.9764999747276306,cross_entropy_value=0.06640978157520294,cost_time=104\n",
      "当前第2750回合，acu_score=0.9750999808311462,cross_entropy_value=0.03094414249062538,cost_time=105\n",
      "当前第2760回合，acu_score=0.9746999740600586,cross_entropy_value=0.017342833802103996,cost_time=105\n",
      "当前第2770回合，acu_score=0.9722999930381775,cross_entropy_value=0.03827224671840668,cost_time=106\n",
      "当前第2780回合，acu_score=0.9763000011444092,cross_entropy_value=0.011960586532950401,cost_time=106\n",
      "当前第2790回合，acu_score=0.9751999974250793,cross_entropy_value=0.07490966469049454,cost_time=106\n",
      "当前第2800回合，acu_score=0.9753999710083008,cross_entropy_value=0.027149850502610207,cost_time=107\n",
      "当前第2810回合，acu_score=0.9757000207901001,cross_entropy_value=0.02445998415350914,cost_time=107\n",
      "当前第2820回合，acu_score=0.975600004196167,cross_entropy_value=0.031496405601501465,cost_time=108\n",
      "当前第2830回合，acu_score=0.9771000146865845,cross_entropy_value=0.005011879373341799,cost_time=108\n",
      "当前第2840回合，acu_score=0.9757999777793884,cross_entropy_value=0.03805374726653099,cost_time=109\n",
      "当前第2850回合，acu_score=0.9746000170707703,cross_entropy_value=0.017022626474499702,cost_time=109\n",
      "当前第2860回合，acu_score=0.9767000079154968,cross_entropy_value=0.039737336337566376,cost_time=110\n",
      "当前第2870回合，acu_score=0.9760000109672546,cross_entropy_value=0.008067994378507137,cost_time=110\n",
      "当前第2880回合，acu_score=0.9732999801635742,cross_entropy_value=0.051752395927906036,cost_time=111\n",
      "当前第2890回合，acu_score=0.9718999862670898,cross_entropy_value=0.05484415218234062,cost_time=111\n",
      "当前第2900回合，acu_score=0.9765999913215637,cross_entropy_value=0.023038392886519432,cost_time=111\n",
      "当前第2910回合，acu_score=0.9761999845504761,cross_entropy_value=0.05629923939704895,cost_time=112\n",
      "当前第2920回合，acu_score=0.9750000238418579,cross_entropy_value=0.017942987382411957,cost_time=112\n",
      "当前第2930回合，acu_score=0.9765999913215637,cross_entropy_value=0.012121024541556835,cost_time=112\n",
      "当前第2940回合，acu_score=0.9768000245094299,cross_entropy_value=0.015345340594649315,cost_time=113\n",
      "当前第2950回合，acu_score=0.9779000282287598,cross_entropy_value=0.044574394822120667,cost_time=113\n",
      "当前第2960回合，acu_score=0.9771999716758728,cross_entropy_value=0.035592664033174515,cost_time=113\n",
      "当前第2970回合，acu_score=0.9768999814987183,cross_entropy_value=0.02423599548637867,cost_time=114\n",
      "当前第2980回合，acu_score=0.974399983882904,cross_entropy_value=0.047824956476688385,cost_time=114\n",
      "当前第2990回合，acu_score=0.9679999947547913,cross_entropy_value=0.09203650802373886,cost_time=115\n",
      "当前第3000回合，acu_score=0.9710999727249146,cross_entropy_value=0.11484647542238235,cost_time=115\n",
      "当前第3010回合，acu_score=0.9775000214576721,cross_entropy_value=0.006404502782970667,cost_time=115\n",
      "当前第3020回合，acu_score=0.975600004196167,cross_entropy_value=0.02562045492231846,cost_time=116\n",
      "当前第3030回合，acu_score=0.977400004863739,cross_entropy_value=0.07719771564006805,cost_time=116\n",
      "当前第3040回合，acu_score=0.9793000221252441,cross_entropy_value=0.014108547940850258,cost_time=116\n",
      "当前第3050回合，acu_score=0.9768000245094299,cross_entropy_value=0.046942807734012604,cost_time=117\n",
      "当前第3060回合，acu_score=0.9761999845504761,cross_entropy_value=0.011999609880149364,cost_time=117\n",
      "当前第3070回合，acu_score=0.9771000146865845,cross_entropy_value=0.036798957735300064,cost_time=117\n",
      "当前第3080回合，acu_score=0.9761000275611877,cross_entropy_value=0.016500679776072502,cost_time=118\n",
      "当前第3090回合，acu_score=0.9775999784469604,cross_entropy_value=0.002903144108131528,cost_time=118\n",
      "当前第3100回合，acu_score=0.9785000085830688,cross_entropy_value=0.028960809111595154,cost_time=119\n",
      "当前第3110回合，acu_score=0.9775999784469604,cross_entropy_value=0.03313817083835602,cost_time=119\n",
      "当前第3120回合，acu_score=0.9797000288963318,cross_entropy_value=0.019932841882109642,cost_time=119\n",
      "当前第3130回合，acu_score=0.9779000282287598,cross_entropy_value=0.1441943347454071,cost_time=120\n",
      "当前第3140回合，acu_score=0.975600004196167,cross_entropy_value=0.016361810266971588,cost_time=120\n",
      "当前第3150回合，acu_score=0.9778000116348267,cross_entropy_value=0.003959898836910725,cost_time=120\n",
      "当前第3160回合，acu_score=0.9764000177383423,cross_entropy_value=0.025962628424167633,cost_time=121\n",
      "当前第3170回合，acu_score=0.9733999967575073,cross_entropy_value=0.04629294574260712,cost_time=121\n",
      "当前第3180回合，acu_score=0.9753000140190125,cross_entropy_value=0.01685299538075924,cost_time=121\n",
      "当前第3190回合，acu_score=0.9735999703407288,cross_entropy_value=0.0813722014427185,cost_time=122\n",
      "当前第3200回合，acu_score=0.9739999771118164,cross_entropy_value=0.07616174966096878,cost_time=122\n",
      "当前第3210回合，acu_score=0.975600004196167,cross_entropy_value=0.06797242909669876,cost_time=123\n",
      "当前第3220回合，acu_score=0.9753000140190125,cross_entropy_value=0.11129464209079742,cost_time=123\n",
      "当前第3230回合，acu_score=0.9724000096321106,cross_entropy_value=0.06178123131394386,cost_time=124\n",
      "当前第3240回合，acu_score=0.9804999828338623,cross_entropy_value=0.038280654698610306,cost_time=124\n",
      "当前第3250回合，acu_score=0.9758999943733215,cross_entropy_value=0.025355704128742218,cost_time=124\n",
      "当前第3260回合，acu_score=0.9767000079154968,cross_entropy_value=0.03576868772506714,cost_time=125\n",
      "当前第3270回合，acu_score=0.979200005531311,cross_entropy_value=0.008460085839033127,cost_time=126\n",
      "当前第3280回合，acu_score=0.9757999777793884,cross_entropy_value=0.034096669405698776,cost_time=126\n",
      "当前第3290回合，acu_score=0.9771000146865845,cross_entropy_value=0.03600950539112091,cost_time=126\n",
      "当前第3300回合，acu_score=0.975600004196167,cross_entropy_value=0.03614003583788872,cost_time=127\n",
      "当前第3310回合，acu_score=0.9758999943733215,cross_entropy_value=0.06355059891939163,cost_time=127\n",
      "当前第3320回合，acu_score=0.978600025177002,cross_entropy_value=0.03791686147451401,cost_time=128\n",
      "当前第3330回合，acu_score=0.9785000085830688,cross_entropy_value=0.022280655801296234,cost_time=128\n",
      "当前第3340回合，acu_score=0.9794999957084656,cross_entropy_value=0.009158738888800144,cost_time=128\n",
      "当前第3350回合，acu_score=0.9790999889373779,cross_entropy_value=0.018287919461727142,cost_time=129\n",
      "当前第3360回合，acu_score=0.9745000004768372,cross_entropy_value=0.009297015145421028,cost_time=129\n",
      "当前第3370回合，acu_score=0.9785000085830688,cross_entropy_value=0.008609838783740997,cost_time=130\n",
      "当前第3380回合，acu_score=0.978600025177002,cross_entropy_value=0.023454075679183006,cost_time=130\n",
      "当前第3390回合，acu_score=0.9776999950408936,cross_entropy_value=0.006104209925979376,cost_time=130\n",
      "当前第3400回合，acu_score=0.979200005531311,cross_entropy_value=0.012472988106310368,cost_time=131\n",
      "当前第3410回合，acu_score=0.9731000065803528,cross_entropy_value=0.021906744688749313,cost_time=131\n",
      "当前第3420回合，acu_score=0.9781000018119812,cross_entropy_value=0.007348232436925173,cost_time=131\n",
      "当前第3430回合，acu_score=0.9789000153541565,cross_entropy_value=0.028262853622436523,cost_time=132\n",
      "当前第3440回合，acu_score=0.9757999777793884,cross_entropy_value=0.02367735467851162,cost_time=132\n",
      "当前第3450回合，acu_score=0.9800999760627747,cross_entropy_value=0.01573689468204975,cost_time=132\n",
      "当前第3460回合，acu_score=0.978600025177002,cross_entropy_value=0.02297060936689377,cost_time=133\n",
      "当前第3470回合，acu_score=0.9794999957084656,cross_entropy_value=0.01643657311797142,cost_time=133\n",
      "当前第3480回合，acu_score=0.978600025177002,cross_entropy_value=0.041156429797410965,cost_time=134\n",
      "当前第3490回合，acu_score=0.9789000153541565,cross_entropy_value=0.021828265860676765,cost_time=134\n",
      "当前第3500回合，acu_score=0.9790999889373779,cross_entropy_value=0.0033195740543305874,cost_time=134\n",
      "当前第3510回合，acu_score=0.9793000221252441,cross_entropy_value=0.004707584157586098,cost_time=135\n",
      "当前第3520回合，acu_score=0.9801999926567078,cross_entropy_value=0.014866665937006474,cost_time=135\n",
      "当前第3530回合，acu_score=0.9742000102996826,cross_entropy_value=0.029322804883122444,cost_time=136\n",
      "当前第3540回合，acu_score=0.9728000164031982,cross_entropy_value=0.04188169911503792,cost_time=136\n",
      "当前第3550回合，acu_score=0.9757999777793884,cross_entropy_value=0.05836543068289757,cost_time=136\n",
      "当前第3560回合，acu_score=0.9767000079154968,cross_entropy_value=0.059791646897792816,cost_time=137\n",
      "当前第3570回合，acu_score=0.9781000018119812,cross_entropy_value=0.02968672476708889,cost_time=137\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第3580回合，acu_score=0.9764999747276306,cross_entropy_value=0.02216579206287861,cost_time=137\n",
      "当前第3590回合，acu_score=0.9746000170707703,cross_entropy_value=0.01212882250547409,cost_time=138\n",
      "当前第3600回合，acu_score=0.9789999723434448,cross_entropy_value=0.006030235439538956,cost_time=138\n",
      "当前第3610回合，acu_score=0.9769999980926514,cross_entropy_value=0.01714441180229187,cost_time=139\n",
      "当前第3620回合，acu_score=0.9750000238418579,cross_entropy_value=0.07729006558656693,cost_time=139\n",
      "当前第3630回合，acu_score=0.979200005531311,cross_entropy_value=0.010445704683661461,cost_time=139\n",
      "当前第3640回合，acu_score=0.9776999950408936,cross_entropy_value=0.004474995657801628,cost_time=140\n",
      "当前第3650回合，acu_score=0.9743000268936157,cross_entropy_value=0.030443495139479637,cost_time=140\n",
      "当前第3660回合，acu_score=0.9783999919891357,cross_entropy_value=0.016773277893662453,cost_time=141\n",
      "当前第3670回合，acu_score=0.9761999845504761,cross_entropy_value=0.050907645374536514,cost_time=141\n",
      "当前第3680回合，acu_score=0.9776999950408936,cross_entropy_value=0.09391093999147415,cost_time=142\n",
      "当前第3690回合，acu_score=0.979200005531311,cross_entropy_value=0.03872646391391754,cost_time=142\n",
      "当前第3700回合，acu_score=0.9771000146865845,cross_entropy_value=0.045646972954273224,cost_time=142\n",
      "当前第3710回合，acu_score=0.9740999937057495,cross_entropy_value=0.055307526141405106,cost_time=143\n",
      "当前第3720回合，acu_score=0.978600025177002,cross_entropy_value=0.04611596092581749,cost_time=143\n",
      "当前第3730回合，acu_score=0.9787999987602234,cross_entropy_value=0.02073730155825615,cost_time=144\n",
      "当前第3740回合，acu_score=0.9753999710083008,cross_entropy_value=0.06613951921463013,cost_time=144\n",
      "当前第3750回合，acu_score=0.9782999753952026,cross_entropy_value=0.005692956503480673,cost_time=144\n",
      "当前第3760回合，acu_score=0.9769999980926514,cross_entropy_value=0.04086381569504738,cost_time=145\n",
      "当前第3770回合，acu_score=0.9746000170707703,cross_entropy_value=0.02431463450193405,cost_time=145\n",
      "当前第3780回合，acu_score=0.9772999882698059,cross_entropy_value=0.022525470703840256,cost_time=145\n",
      "当前第3790回合，acu_score=0.9790999889373779,cross_entropy_value=0.02043798193335533,cost_time=146\n",
      "当前第3800回合，acu_score=0.9746999740600586,cross_entropy_value=0.03406868502497673,cost_time=146\n",
      "当前第3810回合，acu_score=0.973800003528595,cross_entropy_value=0.03698846697807312,cost_time=147\n",
      "当前第3820回合，acu_score=0.9776999950408936,cross_entropy_value=0.026874670758843422,cost_time=147\n",
      "当前第3830回合，acu_score=0.9761999845504761,cross_entropy_value=0.10094238072633743,cost_time=147\n",
      "当前第3840回合，acu_score=0.9761999845504761,cross_entropy_value=0.028779277577996254,cost_time=148\n",
      "当前第3850回合，acu_score=0.9757000207901001,cross_entropy_value=0.0074691916815936565,cost_time=148\n",
      "当前第3860回合，acu_score=0.977400004863739,cross_entropy_value=0.005065277684479952,cost_time=149\n",
      "当前第3870回合，acu_score=0.9783999919891357,cross_entropy_value=0.008029598742723465,cost_time=149\n",
      "当前第3880回合，acu_score=0.9789000153541565,cross_entropy_value=0.007006971165537834,cost_time=149\n",
      "当前第3890回合，acu_score=0.9781000018119812,cross_entropy_value=0.024910928681492805,cost_time=150\n",
      "当前第3900回合，acu_score=0.9764000177383423,cross_entropy_value=0.01865396834909916,cost_time=150\n",
      "当前第3910回合，acu_score=0.9778000116348267,cross_entropy_value=0.009338954463601112,cost_time=151\n",
      "当前第3920回合，acu_score=0.9782999753952026,cross_entropy_value=0.005585582461208105,cost_time=151\n",
      "当前第3930回合，acu_score=0.9786999821662903,cross_entropy_value=0.011634187772870064,cost_time=151\n",
      "当前第3940回合，acu_score=0.9771999716758728,cross_entropy_value=0.003249543020501733,cost_time=152\n",
      "当前第3950回合，acu_score=0.9782000184059143,cross_entropy_value=0.011449102312326431,cost_time=152\n",
      "当前第3960回合，acu_score=0.9757999777793884,cross_entropy_value=0.0360230915248394,cost_time=153\n",
      "当前第3970回合，acu_score=0.9768000245094299,cross_entropy_value=0.01764766126871109,cost_time=153\n",
      "当前第3980回合，acu_score=0.9781000018119812,cross_entropy_value=0.02340216562151909,cost_time=153\n",
      "当前第3990回合，acu_score=0.9739000201225281,cross_entropy_value=0.04316822439432144,cost_time=154\n",
      "当前第4000回合，acu_score=0.9793000221252441,cross_entropy_value=0.011868102476000786,cost_time=154\n",
      "当前第4010回合，acu_score=0.9739000201225281,cross_entropy_value=0.03440172225236893,cost_time=155\n",
      "当前第4020回合，acu_score=0.9769999980926514,cross_entropy_value=0.005380915477871895,cost_time=155\n",
      "当前第4030回合，acu_score=0.9757999777793884,cross_entropy_value=0.023391995579004288,cost_time=155\n",
      "当前第4040回合，acu_score=0.9776999950408936,cross_entropy_value=0.0624593123793602,cost_time=156\n",
      "当前第4050回合，acu_score=0.9783999919891357,cross_entropy_value=0.008458130061626434,cost_time=156\n",
      "当前第4060回合，acu_score=0.9796000123023987,cross_entropy_value=0.019880510866642,cost_time=157\n",
      "当前第4070回合，acu_score=0.9801999926567078,cross_entropy_value=0.00629393570125103,cost_time=157\n",
      "当前第4080回合，acu_score=0.9771000146865845,cross_entropy_value=0.009022652171552181,cost_time=158\n",
      "当前第4090回合，acu_score=0.9778000116348267,cross_entropy_value=0.024891452863812447,cost_time=158\n",
      "当前第4100回合，acu_score=0.98089998960495,cross_entropy_value=0.009710132144391537,cost_time=158\n",
      "当前第4110回合，acu_score=0.9790999889373779,cross_entropy_value=0.00837522279471159,cost_time=159\n",
      "当前第4120回合，acu_score=0.9797000288963318,cross_entropy_value=0.048899661749601364,cost_time=159\n",
      "当前第4130回合，acu_score=0.9769999980926514,cross_entropy_value=0.031062748283147812,cost_time=160\n",
      "当前第4140回合，acu_score=0.975600004196167,cross_entropy_value=0.12185049802064896,cost_time=160\n",
      "当前第4150回合，acu_score=0.9710000157356262,cross_entropy_value=0.11740462481975555,cost_time=160\n",
      "当前第4160回合，acu_score=0.9771999716758728,cross_entropy_value=0.005600078031420708,cost_time=161\n",
      "当前第4170回合，acu_score=0.9789999723434448,cross_entropy_value=0.017508594319224358,cost_time=161\n",
      "当前第4180回合，acu_score=0.9785000085830688,cross_entropy_value=0.027592241764068604,cost_time=161\n",
      "当前第4190回合，acu_score=0.9764999747276306,cross_entropy_value=0.06141412630677223,cost_time=162\n",
      "当前第4200回合，acu_score=0.9779000282287598,cross_entropy_value=0.013011908158659935,cost_time=162\n",
      "当前第4210回合，acu_score=0.9768000245094299,cross_entropy_value=0.023359721526503563,cost_time=163\n",
      "当前第4220回合，acu_score=0.9779999852180481,cross_entropy_value=0.012376150116324425,cost_time=163\n",
      "当前第4230回合，acu_score=0.9775000214576721,cross_entropy_value=0.0072447024285793304,cost_time=163\n",
      "当前第4240回合，acu_score=0.9785000085830688,cross_entropy_value=0.021550312638282776,cost_time=164\n",
      "当前第4250回合，acu_score=0.9787999987602234,cross_entropy_value=0.01739579811692238,cost_time=164\n",
      "当前第4260回合，acu_score=0.977400004863739,cross_entropy_value=0.031730759888887405,cost_time=165\n",
      "当前第4270回合，acu_score=0.978600025177002,cross_entropy_value=0.02269393764436245,cost_time=165\n",
      "当前第4280回合，acu_score=0.9787999987602234,cross_entropy_value=0.009244939312338829,cost_time=165\n",
      "当前第4290回合，acu_score=0.9753999710083008,cross_entropy_value=0.0017746203811839223,cost_time=166\n",
      "当前第4300回合，acu_score=0.9779999852180481,cross_entropy_value=0.019538044929504395,cost_time=166\n",
      "当前第4310回合，acu_score=0.9779999852180481,cross_entropy_value=0.045696865767240524,cost_time=167\n",
      "当前第4320回合，acu_score=0.9785000085830688,cross_entropy_value=0.008728478103876114,cost_time=167\n",
      "当前第4330回合，acu_score=0.9765999913215637,cross_entropy_value=0.0031422022730112076,cost_time=167\n",
      "当前第4340回合，acu_score=0.9722999930381775,cross_entropy_value=0.04057297855615616,cost_time=168\n",
      "当前第4350回合，acu_score=0.9769999980926514,cross_entropy_value=0.04153553023934364,cost_time=168\n",
      "当前第4360回合，acu_score=0.9782999753952026,cross_entropy_value=0.006761678494513035,cost_time=169\n",
      "当前第4370回合，acu_score=0.9794999957084656,cross_entropy_value=0.004328384529799223,cost_time=169\n",
      "当前第4380回合，acu_score=0.9794999957084656,cross_entropy_value=0.012308146804571152,cost_time=170\n",
      "当前第4390回合，acu_score=0.9779000282287598,cross_entropy_value=0.029883956536650658,cost_time=170\n",
      "当前第4400回合，acu_score=0.9783999919891357,cross_entropy_value=0.008779086172580719,cost_time=171\n",
      "当前第4410回合，acu_score=0.9778000116348267,cross_entropy_value=0.019651547074317932,cost_time=171\n",
      "当前第4420回合，acu_score=0.9814000129699707,cross_entropy_value=0.0034106140956282616,cost_time=171\n",
      "当前第4430回合，acu_score=0.9818999767303467,cross_entropy_value=0.026884421706199646,cost_time=172\n",
      "当前第4440回合，acu_score=0.9812999963760376,cross_entropy_value=0.010200195014476776,cost_time=172\n",
      "当前第4450回合，acu_score=0.9786999821662903,cross_entropy_value=0.015545918606221676,cost_time=173\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第4460回合，acu_score=0.9789999723434448,cross_entropy_value=0.010716051794588566,cost_time=174\n",
      "当前第4470回合，acu_score=0.978600025177002,cross_entropy_value=0.005885716062039137,cost_time=174\n",
      "当前第4480回合，acu_score=0.9793000221252441,cross_entropy_value=0.015070753172039986,cost_time=174\n",
      "当前第4490回合，acu_score=0.9801999926567078,cross_entropy_value=0.005588062573224306,cost_time=175\n",
      "当前第4500回合，acu_score=0.9786999821662903,cross_entropy_value=0.008929306641221046,cost_time=175\n",
      "当前第4510回合，acu_score=0.9779000282287598,cross_entropy_value=0.021665478125214577,cost_time=176\n",
      "当前第4520回合，acu_score=0.9771000146865845,cross_entropy_value=0.03518541157245636,cost_time=176\n",
      "当前第4530回合，acu_score=0.9789000153541565,cross_entropy_value=0.015208672732114792,cost_time=176\n",
      "当前第4540回合，acu_score=0.978600025177002,cross_entropy_value=0.018480366095900536,cost_time=177\n",
      "当前第4550回合，acu_score=0.9790999889373779,cross_entropy_value=0.008355477824807167,cost_time=177\n",
      "当前第4560回合，acu_score=0.9781000018119812,cross_entropy_value=0.015659114345908165,cost_time=178\n",
      "当前第4570回合，acu_score=0.978600025177002,cross_entropy_value=0.003056060057133436,cost_time=178\n",
      "当前第4580回合，acu_score=0.9786999821662903,cross_entropy_value=0.023564141243696213,cost_time=178\n",
      "当前第4590回合，acu_score=0.9775999784469604,cross_entropy_value=0.028895681723952293,cost_time=179\n",
      "当前第4600回合，acu_score=0.9750999808311462,cross_entropy_value=0.054109591990709305,cost_time=179\n",
      "当前第4610回合，acu_score=0.9787999987602234,cross_entropy_value=0.02710130251944065,cost_time=180\n",
      "当前第4620回合，acu_score=0.9721999764442444,cross_entropy_value=0.0017967605963349342,cost_time=180\n",
      "当前第4630回合，acu_score=0.9790999889373779,cross_entropy_value=0.001814369228668511,cost_time=181\n",
      "当前第4640回合，acu_score=0.979200005531311,cross_entropy_value=0.009344867430627346,cost_time=181\n",
      "当前第4650回合，acu_score=0.9764999747276306,cross_entropy_value=0.03404425084590912,cost_time=181\n",
      "当前第4660回合，acu_score=0.9768000245094299,cross_entropy_value=0.03791134059429169,cost_time=182\n",
      "当前第4670回合，acu_score=0.9782000184059143,cross_entropy_value=0.008450442925095558,cost_time=182\n",
      "当前第4680回合，acu_score=0.9771000146865845,cross_entropy_value=0.003420803928747773,cost_time=183\n",
      "当前第4690回合，acu_score=0.9750000238418579,cross_entropy_value=0.15031537413597107,cost_time=183\n",
      "当前第4700回合，acu_score=0.9732999801635742,cross_entropy_value=0.09249827265739441,cost_time=184\n",
      "当前第4710回合，acu_score=0.9789999723434448,cross_entropy_value=0.008950239978730679,cost_time=184\n",
      "当前第4720回合，acu_score=0.9789000153541565,cross_entropy_value=0.004047995898872614,cost_time=184\n",
      "当前第4730回合，acu_score=0.9781000018119812,cross_entropy_value=0.012875624932348728,cost_time=185\n",
      "当前第4740回合，acu_score=0.9779999852180481,cross_entropy_value=0.006086777895689011,cost_time=185\n",
      "当前第4750回合，acu_score=0.9772999882698059,cross_entropy_value=0.04131663218140602,cost_time=185\n",
      "当前第4760回合，acu_score=0.9786999821662903,cross_entropy_value=0.0032792931888252497,cost_time=186\n",
      "当前第4770回合，acu_score=0.972599983215332,cross_entropy_value=0.035638097673654556,cost_time=186\n",
      "当前第4780回合，acu_score=0.9787999987602234,cross_entropy_value=0.01584639959037304,cost_time=187\n",
      "当前第4790回合，acu_score=0.9790999889373779,cross_entropy_value=0.02736375294625759,cost_time=187\n",
      "当前第4800回合，acu_score=0.980400025844574,cross_entropy_value=0.009334292262792587,cost_time=188\n",
      "当前第4810回合，acu_score=0.9751999974250793,cross_entropy_value=0.06586980819702148,cost_time=188\n",
      "当前第4820回合，acu_score=0.9724000096321106,cross_entropy_value=0.10500247031450272,cost_time=189\n",
      "当前第4830回合，acu_score=0.9799000024795532,cross_entropy_value=0.014296147041022778,cost_time=189\n",
      "当前第4840回合，acu_score=0.9799000024795532,cross_entropy_value=0.006027704570442438,cost_time=190\n",
      "当前第4850回合，acu_score=0.9775000214576721,cross_entropy_value=0.026751384139060974,cost_time=190\n",
      "当前第4860回合，acu_score=0.9797000288963318,cross_entropy_value=0.0069031380116939545,cost_time=191\n",
      "当前第4870回合，acu_score=0.9782999753952026,cross_entropy_value=0.003559514181688428,cost_time=191\n",
      "当前第4880回合，acu_score=0.9769999980926514,cross_entropy_value=0.0021021352149546146,cost_time=191\n",
      "当前第4890回合，acu_score=0.9804999828338623,cross_entropy_value=0.026765042915940285,cost_time=192\n",
      "当前第4900回合，acu_score=0.9749000072479248,cross_entropy_value=0.032291583716869354,cost_time=192\n",
      "当前第4910回合，acu_score=0.9799000024795532,cross_entropy_value=0.008842156268656254,cost_time=193\n",
      "当前第4920回合，acu_score=0.980400025844574,cross_entropy_value=0.010447957552969456,cost_time=193\n",
      "当前第4930回合，acu_score=0.972599983215332,cross_entropy_value=0.07697369158267975,cost_time=193\n",
      "当前第4940回合，acu_score=0.9778000116348267,cross_entropy_value=0.008563387207686901,cost_time=194\n",
      "当前第4950回合，acu_score=0.9794999957084656,cross_entropy_value=0.01045842096209526,cost_time=194\n",
      "当前第4960回合，acu_score=0.9767000079154968,cross_entropy_value=0.011653833091259003,cost_time=195\n",
      "当前第4970回合，acu_score=0.9801999926567078,cross_entropy_value=0.014499165117740631,cost_time=195\n",
      "当前第4980回合，acu_score=0.9783999919891357,cross_entropy_value=0.0034956992603838444,cost_time=196\n",
      "当前第4990回合，acu_score=0.9794999957084656,cross_entropy_value=0.02224539965391159,cost_time=196\n",
      "当前第5000回合，acu_score=0.9807999730110168,cross_entropy_value=0.00389694282785058,cost_time=196\n",
      "当前第5010回合，acu_score=0.9807999730110168,cross_entropy_value=0.010022656992077827,cost_time=197\n",
      "当前第5020回合，acu_score=0.9797999858856201,cross_entropy_value=0.004587673582136631,cost_time=197\n",
      "当前第5030回合，acu_score=0.9793999791145325,cross_entropy_value=0.005342648830264807,cost_time=198\n",
      "当前第5040回合，acu_score=0.9810000061988831,cross_entropy_value=0.005133799277245998,cost_time=198\n",
      "当前第5050回合，acu_score=0.9811000227928162,cross_entropy_value=0.0015774619532749057,cost_time=199\n",
      "当前第5060回合，acu_score=0.9800000190734863,cross_entropy_value=0.010028098709881306,cost_time=199\n",
      "当前第5070回合，acu_score=0.9804999828338623,cross_entropy_value=0.010651879012584686,cost_time=199\n",
      "当前第5080回合，acu_score=0.9812999963760376,cross_entropy_value=0.004426321014761925,cost_time=200\n",
      "当前第5090回合，acu_score=0.9796000123023987,cross_entropy_value=0.012418976984918118,cost_time=200\n",
      "当前第5100回合，acu_score=0.98089998960495,cross_entropy_value=0.0032524224370718002,cost_time=201\n",
      "当前第5110回合，acu_score=0.9793999791145325,cross_entropy_value=0.013345645740628242,cost_time=201\n",
      "当前第5120回合，acu_score=0.9801999926567078,cross_entropy_value=0.0024871372152119875,cost_time=201\n",
      "当前第5130回合，acu_score=0.9811000227928162,cross_entropy_value=0.008110711351037025,cost_time=202\n",
      "当前第5140回合，acu_score=0.9805999994277954,cross_entropy_value=0.010813149623572826,cost_time=202\n",
      "当前第5150回合，acu_score=0.9811000227928162,cross_entropy_value=0.008535873144865036,cost_time=203\n",
      "当前第5160回合，acu_score=0.9789000153541565,cross_entropy_value=0.017875226214528084,cost_time=203\n",
      "当前第5170回合，acu_score=0.9815999865531921,cross_entropy_value=0.003738013096153736,cost_time=204\n",
      "当前第5180回合，acu_score=0.9761999845504761,cross_entropy_value=0.03206012398004532,cost_time=204\n",
      "当前第5190回合，acu_score=0.9801999926567078,cross_entropy_value=0.004709118511527777,cost_time=205\n",
      "当前第5200回合，acu_score=0.9800000190734863,cross_entropy_value=0.0073967319913208485,cost_time=205\n",
      "当前第5210回合，acu_score=0.9793000221252441,cross_entropy_value=0.010681255720555782,cost_time=206\n",
      "当前第5220回合，acu_score=0.9803000092506409,cross_entropy_value=0.002890039002522826,cost_time=206\n",
      "当前第5230回合，acu_score=0.9800000190734863,cross_entropy_value=0.005368267185986042,cost_time=206\n",
      "当前第5240回合，acu_score=0.9810000061988831,cross_entropy_value=0.00996191706508398,cost_time=207\n",
      "当前第5250回合，acu_score=0.9545000195503235,cross_entropy_value=0.09666405618190765,cost_time=207\n",
      "当前第5260回合，acu_score=0.979200005531311,cross_entropy_value=0.0032680195290595293,cost_time=208\n",
      "当前第5270回合，acu_score=0.9778000116348267,cross_entropy_value=0.01838286966085434,cost_time=208\n",
      "当前第5280回合，acu_score=0.9781000018119812,cross_entropy_value=0.003688748460263014,cost_time=209\n",
      "当前第5290回合，acu_score=0.978600025177002,cross_entropy_value=0.00444001005962491,cost_time=209\n",
      "当前第5300回合，acu_score=0.9807000160217285,cross_entropy_value=0.027885546907782555,cost_time=209\n",
      "当前第5310回合，acu_score=0.9807999730110168,cross_entropy_value=0.008177099749445915,cost_time=210\n",
      "当前第5320回合，acu_score=0.9783999919891357,cross_entropy_value=0.01046297699213028,cost_time=211\n",
      "当前第5330回合，acu_score=0.9750999808311462,cross_entropy_value=0.03213716670870781,cost_time=211\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前第5340回合，acu_score=0.9800000190734863,cross_entropy_value=0.025295386090874672,cost_time=211\n",
      "当前第5350回合，acu_score=0.9779000282287598,cross_entropy_value=0.014168504625558853,cost_time=212\n",
      "当前第5360回合，acu_score=0.9782000184059143,cross_entropy_value=0.01628449186682701,cost_time=212\n",
      "当前第5370回合，acu_score=0.9804999828338623,cross_entropy_value=0.0031369118951261044,cost_time=213\n",
      "当前第5380回合，acu_score=0.98089998960495,cross_entropy_value=0.022654373198747635,cost_time=213\n",
      "当前第5390回合，acu_score=0.9782999753952026,cross_entropy_value=0.029771743342280388,cost_time=214\n",
      "当前第5400回合，acu_score=0.9800000190734863,cross_entropy_value=0.017026763409376144,cost_time=214\n",
      "当前第5410回合，acu_score=0.9799000024795532,cross_entropy_value=0.002165042096748948,cost_time=214\n",
      "当前第5420回合，acu_score=0.9779000282287598,cross_entropy_value=0.03574994206428528,cost_time=215\n",
      "当前第5430回合，acu_score=0.9797999858856201,cross_entropy_value=0.004266100004315376,cost_time=215\n",
      "当前第5440回合，acu_score=0.9811999797821045,cross_entropy_value=0.010584790259599686,cost_time=216\n",
      "当前第5450回合，acu_score=0.9789999723434448,cross_entropy_value=0.01430587563663721,cost_time=216\n",
      "当前第5460回合，acu_score=0.9761999845504761,cross_entropy_value=0.006295440252870321,cost_time=216\n",
      "当前第5470回合，acu_score=0.9797000288963318,cross_entropy_value=0.0034131782595068216,cost_time=217\n",
      "当前第5480回合，acu_score=0.9789999723434448,cross_entropy_value=0.005403206218034029,cost_time=217\n",
      "当前第5490回合，acu_score=0.9789999723434448,cross_entropy_value=0.005959329195320606,cost_time=218\n",
      "当前第5500回合，acu_score=0.9796000123023987,cross_entropy_value=0.005290079861879349,cost_time=218\n",
      "当前第5510回合，acu_score=0.9801999926567078,cross_entropy_value=0.001446476555429399,cost_time=219\n",
      "当前第5520回合，acu_score=0.9807999730110168,cross_entropy_value=0.010808467864990234,cost_time=219\n",
      "当前第5530回合，acu_score=0.9812999963760376,cross_entropy_value=0.0033351737074553967,cost_time=220\n",
      "当前第5540回合，acu_score=0.9801999926567078,cross_entropy_value=0.002650125417858362,cost_time=220\n",
      "当前第5550回合，acu_score=0.9817000031471252,cross_entropy_value=0.0005766626563854516,cost_time=221\n",
      "当前第5560回合，acu_score=0.9815000295639038,cross_entropy_value=0.001724032568745315,cost_time=221\n",
      "当前第5570回合，acu_score=0.98089998960495,cross_entropy_value=0.0023162320721894503,cost_time=222\n",
      "当前第5580回合，acu_score=0.9793000221252441,cross_entropy_value=0.010686704888939857,cost_time=222\n",
      "当前第5590回合，acu_score=0.980400025844574,cross_entropy_value=0.008031201548874378,cost_time=222\n",
      "当前第5600回合，acu_score=0.9793999791145325,cross_entropy_value=0.011783089488744736,cost_time=223\n",
      "当前第5610回合，acu_score=0.9800999760627747,cross_entropy_value=0.005853148642927408,cost_time=223\n",
      "当前第5620回合，acu_score=0.9804999828338623,cross_entropy_value=0.017077311873435974,cost_time=224\n",
      "当前第5630回合，acu_score=0.977400004863739,cross_entropy_value=0.013068160973489285,cost_time=224\n",
      "当前第5640回合，acu_score=0.9779999852180481,cross_entropy_value=0.029311854392290115,cost_time=225\n",
      "当前第5650回合，acu_score=0.9768999814987183,cross_entropy_value=0.02237520180642605,cost_time=225\n",
      "当前第5660回合，acu_score=0.9804999828338623,cross_entropy_value=0.00469971913844347,cost_time=225\n",
      "当前第5670回合，acu_score=0.9814000129699707,cross_entropy_value=0.0043102349154651165,cost_time=226\n",
      "当前第5680回合，acu_score=0.9811000227928162,cross_entropy_value=0.003512583440169692,cost_time=226\n",
      "当前第5690回合，acu_score=0.9815999865531921,cross_entropy_value=0.012281241826713085,cost_time=227\n",
      "当前第5700回合，acu_score=0.9790999889373779,cross_entropy_value=0.0036022558342665434,cost_time=227\n",
      "当前第5710回合，acu_score=0.9815000295639038,cross_entropy_value=0.006273173727095127,cost_time=228\n",
      "当前第5720回合，acu_score=0.9807999730110168,cross_entropy_value=0.007944534532725811,cost_time=228\n",
      "当前第5730回合，acu_score=0.9811000227928162,cross_entropy_value=0.003154392819851637,cost_time=229\n",
      "当前第5740回合，acu_score=0.9781000018119812,cross_entropy_value=0.001969786360859871,cost_time=229\n",
      "当前第5750回合，acu_score=0.9803000092506409,cross_entropy_value=0.002218561712652445,cost_time=230\n",
      "当前第5760回合，acu_score=0.9783999919891357,cross_entropy_value=0.006676263641566038,cost_time=230\n",
      "当前第5770回合，acu_score=0.9801999926567078,cross_entropy_value=0.026954814791679382,cost_time=231\n",
      "当前第5780回合，acu_score=0.9785000085830688,cross_entropy_value=0.004056596662849188,cost_time=231\n",
      "当前第5790回合，acu_score=0.9818000197410583,cross_entropy_value=0.013227167539298534,cost_time=231\n",
      "当前第5800回合，acu_score=0.9800999760627747,cross_entropy_value=0.013540323823690414,cost_time=232\n",
      "当前第5810回合，acu_score=0.980400025844574,cross_entropy_value=0.0016186274588108063,cost_time=232\n",
      "当前第5820回合，acu_score=0.9807999730110168,cross_entropy_value=0.004844177048653364,cost_time=233\n",
      "当前第5830回合，acu_score=0.98089998960495,cross_entropy_value=0.008264160715043545,cost_time=233\n",
      "当前第5840回合，acu_score=0.9807000160217285,cross_entropy_value=0.001998141873627901,cost_time=234\n",
      "当前第5850回合，acu_score=0.9796000123023987,cross_entropy_value=0.007220313418656588,cost_time=234\n",
      "当前第5860回合，acu_score=0.9804999828338623,cross_entropy_value=0.009550652466714382,cost_time=234\n",
      "当前第5870回合，acu_score=0.9812999963760376,cross_entropy_value=0.005400399677455425,cost_time=235\n",
      "当前第5880回合，acu_score=0.9814000129699707,cross_entropy_value=0.007270901929587126,cost_time=235\n",
      "当前第5890回合，acu_score=0.9819999933242798,cross_entropy_value=0.0020885660778731108,cost_time=236\n",
      "当前第5900回合，acu_score=0.9815999865531921,cross_entropy_value=0.0032323915511369705,cost_time=236\n",
      "当前第5910回合，acu_score=0.9800999760627747,cross_entropy_value=0.019427604973316193,cost_time=237\n",
      "当前第5920回合，acu_score=0.9800999760627747,cross_entropy_value=0.005367475561797619,cost_time=237\n",
      "当前第5930回合，acu_score=0.9804999828338623,cross_entropy_value=0.0027372536715120077,cost_time=238\n",
      "当前第5940回合，acu_score=0.9800999760627747,cross_entropy_value=0.007500756997615099,cost_time=238\n",
      "当前第5950回合，acu_score=0.9810000061988831,cross_entropy_value=0.003956763539463282,cost_time=239\n",
      "当前第5960回合，acu_score=0.9807999730110168,cross_entropy_value=0.012782498262822628,cost_time=239\n",
      "当前第5970回合，acu_score=0.9804999828338623,cross_entropy_value=0.00657249428331852,cost_time=240\n",
      "当前第5980回合，acu_score=0.9799000024795532,cross_entropy_value=0.0005556994001381099,cost_time=240\n",
      "当前第5990回合，acu_score=0.9799000024795532,cross_entropy_value=0.001719763851724565,cost_time=241\n"
     ]
    }
   ],
   "source": [
    "# Train\n",
    "begin = time.time()\n",
    "for _ in range(6000):\n",
    "    batch_xs, batch_ys = mnist.train.next_batch(100)\n",
    "    if _%10 == 0:\n",
    "        train_step_value, cross_entropy_value = sess.run([train_step,cross_entropy], feed_dict={x: batch_xs, y_: batch_ys})\n",
    "        accuracy = get_accuracy(x, y, y_)\n",
    "        print(\"当前第{0}回合，acu_score={1},cross_entropy_value={2},cost_time={3}\"\n",
    "              .format( _, accuracy, cross_entropy_value, int(time.time()-begin)))\n",
    "    else:\n",
    "        sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "验证我们模型在测试数据上的准确率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.0727589, 0.981]\n"
     ]
    }
   ],
   "source": [
    "# Test trained model\n",
    "correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1))\n",
    "accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))\n",
    "print(sess.run([cross_entropy,accuracy], feed_dict={x: mnist.test.images,\n",
    "                                      y_: mnist.test.labels}))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "毫无疑问，这个模型是一个非常简陋，性能也不理想的模型。目前只能达到92%左右的准确率。\n",
    "接下来，希望大家利用现有的知识，将这个模型优化至98%以上的准确率。\n",
    "Hint：\n",
    "- 多隐层\n",
    "- 激活函数\n",
    "- 正则化\n",
    "- 初始化\n",
    "- 摸索一下各个超参数\n",
    "  - 隐层神经元数量\n",
    "  - 学习率\n",
    "  - 正则化惩罚因子\n",
    "  - 最好每隔几个step就对loss、accuracy等等进行一次输出，这样才能有根据地进行调整"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
